package com.homwork.Bean;


import lombok.Builder;
import lombok.Data;

/**
 * 购买的商品信息--购物车
 */
@Data
@Builder
public class Shopping_cart {
     /**
      * 商品名称
      */
    private String Shop_name;
    /**
     *单价
     */
    private int unit_price;
    /**
     * 个数
     */
    private int number;
    /**
     * 金额 总金额=个数*单价
     */
    private int amount;


    @Override
    public String toString() {
        amount=  unit_price*number;
        return
               Shop_name + "  " +
                "  " + unit_price +
                "  " + number +
                "  " + amount ;
    }
}
